var lastLog;
var console = {};
console.log = function(msg) {
	lastLog = msg;
}
console.error = function(msg) {
	lastLog = msg;
}

module("Logger: with Logger.level(Logger.WARN) ", {
  setup : function() {
  	Logger.level(Logger.WARN);
  	lastLog = null;
  },
  teardown: function() {
    lastLog = null;
  }
});

test("Debug Log ", function() {
	
	var testMessage = "this is a test";
	Logger.debug(testMessage);
	
	equal(null, lastLog);
});

test("Info Log ", function() {
	
	var testMessage = "this is a test";
	Logger.info(testMessage);
	
	equal(null, lastLog);
});

test("Warn Log ", function() {
	
	var testMessage = "this is a test";
	Logger.warn(testMessage);
	
	equal(testMessage, lastLog);
});

test("Error Log ", function() {
	
	var testMessage = "this is a test";
	Logger.error(testMessage);
	
	equal(testMessage, lastLog);
});
